package com.api.syh56.shengyunhui.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.DefaultValue;
import lombok.*;
import lombok.experimental.FieldDefaults;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@FieldDefaults(level = AccessLevel.PRIVATE)
@TableName("pay_info")
public class PayInfo {

    @Column(name = "id",isKey = true,isAutoIncrement = true)
    Long id;

    /**
     * 运单Id
     */
    @Column(name = "waybill_id",comment = "运单id")
    Long waybillId;


    /**
     * SYH系统支付单号
     */
    @Column(name = "pay_num",comment = "SYH系统支付单号")
    String PayNum;

    /**
     * 微信退款单号
     */
    @Column(name = "out_refund_no",comment = "微信退款单号")
    String outRefundNo;

    /**
     * 付款人
     */
    @Column(name = "payer",comment = "付款人")
    Long payer;
    /**
     * 收款人
     */
    @Column(name = "payee",comment = "收款人")
    Long payee;
    /**
     * 金额
     */
    @Column(name = "amount",comment = "金额")
    BigDecimal amount;
    /**
     * 金额类型
     */
    @Column(name = "amount_type",comment = "金额类型")
    Short amountType;
    /**
     * 支付状态
     */
    @Column(name = "state",comment = "支付状态")
    Short state;

//    @Column(name = "deposit_status",comment = "是否已退定金")
//    Short depositStatus;
    /**
     * 描述
     */
    @Column(name = "description",comment = "描述")
    String description;

    @TableField(fill = FieldFill.INSERT)
    @Column(name = "creation_time") // 创建时间
    private LocalDateTime creationTime;

    @Column(name = "last_modification_time") // 最后修改时间
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime lastModificationTime;

    @TableLogic
    @Column(name = "is_deleted")
    @DefaultValue("false")
    private Boolean isDeleted;
}
